Portable Multithreading-The Signal Stack Trick for User-Space Thread Creation
نویسنده
چکیده
This paper describes a pragmatic but portable fallback approach for creating and dispatching between the machine contexts of multiple threads of execution on Unix systems that lack a dedicated user-space context switching facility. Such a fallback approach for implementing machine contexts is a vital part of a user-space multithreading environment, if it has to achieve maximum portability across a wide range of Unix flavors. The approach is entirely based on standard Unix system facilities and ANSI-C language features and especially does not require any assembly code or platform specific tricks at all. The most interesting issue is the technique of creating the machine context for threads, which this paper explains in detail. The described approach closely follows the algorithm as implemented by the author for the popular user-space multithreading library GNU Portable Threads (GNU Pth, [25]) which this way quickly gained the status of one of the most portable user-space multithreading libraries.
منابع مشابه
Multithreading Languages
It is di cult to map the execution model of multithreading languages (languages which support ne-grain dynamic thread creation) onto the single stack execution model of C. Consequently, previous work on e cient multithreading uses elaborate frame formats and allocation strategy, with compilers customized for them. This paper presents an alternative cost-e ective implementation strategy for mult...
متن کاملFine - grain Multithreading with Minimal Compiler
It is di cult to map the execution model of multithreading languages (languages which support ne-grain dynamic thread creation) onto the single stack execution model of C. Consequently, previous work on e cient multithreading uses elaborate frame formats and allocation strategy, with compilers customized for them. This paper presents an alternative cost-e ective implementation strategy for mult...
متن کاملRuntime Mechanisms for E cient Dynamic
High performance on distributed memory machines for programming models with dynamic thread creation and multithreading requires eecient thread management and communication. Traditional mul-tithreading runtimes, consisting of few general-purpose, bundled mechanisms that assume minimal compiler and hardware support, are suitable for computations involving coarse-grained threads but provide low ee...
متن کاملPerformance Evaluation and Optimization of A Custom Native Linux Threads Library
The current SpecC simulator utilizes PosixThreads, QuickThreads or a custom native Linux thread library named LiteThreads to perform thread manipulation. While QuickThreads is very efficient as a user-level thread library and PosixThreads supports multithreading and the parallel simulator, the proposed LiteThreads library combines the advantages of both thread libraries and aimes to achieve a s...
متن کاملA Multithreading Platform for Multimedia Applications
Complex multimedia applications have diverse resource and timing requirements. A platform for building such programs therefore should supply the developer with mechanisms for managing concurrency, communication, and real-time constraints but should remain flexible with regard to scheduling policies and interaction models. We have developed such a platform consisting of a user-level threads pack...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2000